<!--
/**************************************************/
/* Programmer: Dimas Widjaya                      */
/*       Date: 2/2/2013                           */
/*  Page Name: QuestionsAndTests.php              */
/*                                                */
/**************************************************/

/**************************************************/
/*  The site index, provides login system.        */
/*                                                */
/**************************************************/

/**************************************************/
/*   Date        Reviser       Revision           */
/* --------     ---------     ----------          */
/* 2/18/2013    DCA           01                  */
/*                                                */ 
/*	                                              */
/*							        			  */
/*                                                */
/**************************************************/
-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="css/template.css">
		<link rel="stylesheet" type="text/css" href="css/QuestionsAndTests.css">
		<link rel="stylesheet" type="text/css" href="css/smoothness/jquery-ui-1.10.0.custom.css" />
		<script type="text/javascript" src="JQuery/jquery-1.9.0.min.js"></script>  
		<script type="text/javascript" src="JQuery/jquery-ui-1.10.0.custom.js"></script> 
		<script type="text/javascript" src="JS/QA.js"></script>
		
		<title>Create New Exam</title>
	</head>
	<body>
		<div id="main">
		<?php
			require_once('session_handler.php');
            session_handler_start();
		?>
			
			<div id="TopBoard">
				<a href="main.php">
				<img src="images/redpen-01.png" alt="RedPenLogo" id="RedPenLogo"/>
				</a>
				<span id="AuthInfo">
					<span id="Avatar">
						<?php
							echo '<img src="images/avatar/' . $_SESSION['avatar'] .'" id="AvatarImg" />';
						?>
					</span> 
					<span id="UserName">
					<?php
						echo $_SESSION['username'];
					?>
					</span>
					<span id="Power" style="display: none">
		
					</span>
					<span id="LogOut"><a href="logout.php" id="LogoutLink">Logout</a></span>
				</span>
			</div>
			
			<div id="HeaderBar"></div>
			
			<div id="Content">	
				<br/><br/><br/>
				<div id="CreateExamContainer">
				
				<div id="InnerContainer">
				
				<?php
					require_once('functions.php');
					require_once('webservices.php');
					require_once('test_creation.php');
					
					$result = populate_dropdown_options(Get_teacher_courses($_SESSION['userid']));
					if($result != null)
					{
						display_classes_and_test_init_creation($_SESSION['userid'], $result);
					}
					else
						echo "there are no courses that are open for test creation. please contact administration (aka flash gordon STYLE!!!!) for verification.<br />have a nice day";
				?>
				</div>
				</div>
			</div>
			
			<div id="footer">
				<div id="HeaderBar"></div>
				<br/>
				<span id="Copyright">
					&#169; Team Flash 2013
					<br/>Pensacola Christian College
				</span>
				<br/>
			</div>		
		</div>
	</body>
			
</html>